This page last changed on Apr 09, 2007 by cholmes.

This tutorial will guide you through adding a coverage dataset to GeoServer and then view it.

The type of data we will be adding is a GeoTIFF (.tiff). These instructions, however, should work for any raster type that GeoServer supports. For some more information on coverages and coverage configuration, please visit these following pages:
CoverageStores
Coverages

Vocabulary

First some terminology. What is a "coverage"? A coverage is raster data; in other words, an image or a set of images. Usually background imagery such as satellite photos.

A "Coverage Store" is the location GeoServer uses to find coverage information. This is usually a directory or a file. It is similar to a "Data Store".

A "Coverage" itself is the raster data. It is like a Feature Type, but for raster images instead of vector data.

The steps for setting up raster data in GeoServer is relatively simple. First you create a Coverage Store, then you create a Coverage.
Getting the data and processing it is not always as easy though. But we have created an in-depth tutorial for processing and loading NASA's Blue Marble dataset into GeoServer.

Getting Started

The first thing to do is to get some data that you want to load into GeoServer. We made that easy for you and created a small raster dataset for you to download. You can grab it here; it is also an attachment to this page sample.zip).

The second thing you need to do is grab a version of GeoServer that supports WCS coverages (any version higher than 1.5-beta2).

Once you are set up and have the data downloaded, move onto the next steps.

Step 1: Create a Coverage Store

Once you have downloaded this file, unzip the contents to your [geoserver_install]/data_dir/coverages/ directory.
It should extract a single file called "sample.tiff".
This is what the directory should look like:

[geoserver_home]/data_dir/coverages/
    .
    arc_sample/
    geotiff_sample/
    img_sample/
    img_sample2_Pk50095/
    mosaic_sample/
    sample.tiff

The next step is to create a Coverage Store. This is where we point GeoServer at our data.
If you haven't yet, start up GeoServer. When it is finished loading, navigate to the Data page under Config | Data.

If you have to log in, the default username is admin and the default password is geoserver



Next click on the CoverageStores link.



You will now be at the CoverageStore screen. Click on the New link on the left.



Now you will be at the Coverage Store 'New' screen. From the drop down list, select "Tagged Image File Format with Geographic Information". In short this means "TIFF".
Then for the ID, enter tutorial. It can really be anything you want, but I am going to use the name "tutorial".
Then click the New button.



You are now in the Coverage Store editor.
The only thing you have to change here is the URL field. Set it to: *file:coverages/sample.tiff*
This is a relative path, from our data directory, to the sample.tiff file. It is stored in the coverages/ directory.

Click on the Submit button.



Step 2: Create a Coverage

Now we need to tell GeoServer about our coverage store. We do this in the Coverage editor.

As of GeoServer 1.5.0-RC3, you should be automatically taken to the coverage editor after hitting 'submit' on a new coverage. If you need to go straight to the editor at a later time, you can do that by going to Config -> Data -> Coverages and selecting your coverage from the list.

Once you are in the coverage editor, all you have to do here is select the raster style from the list and then hit the double arrows >>. This will add the style over on the right. You can add several styles here, but we only need the one.

Currently support for styling rasters is very primitive. Due to this fact setting the style as described in this tutorial will have no effect. See http://jira.codehaus.org/browse/GEOS-932 for more details.

You'll also need to set the SRS and the bounding box. Your raster data should have this information, you just need to hit 'lookup srs' and 'generate bbox' to call them. But if you already know the values you can just enter them directly.

Now hit the Submit button at the bottom of the page.



Finally, hit the Apply and then Save buttons on the upper left hand side of the page.



Step 3: Preview the Data

Now that the data is loaded, we can preview it. Head to the 'Welcome' home page and click on the Demo button.



Next, click on the MapPreview link in the middle of the page. This will take you to the preview screen.

On that screen locate your new Coverage dataset and then click on it, or the Preview button to the right of it.



A new window should load, and in that should be a preview of the data set you entered. It should look like this:



Further Reading

If you made it this far, why not go a little further? There is some good reading in our documentation page as well as a useful tutorial on how to load all of NASA's Blue Marble dataset.







i couldnĀ“t add a .tiff image that is 4800x4800. why?? what can i do? please help me.

Posted by rita at Aug 13, 2007 18:45

I'm using uDig to display my wms data, however it doesn't like any coverage data I add! It says that the coordinate system is unknown. Any idea why this is?

Posted by [email protected] at Aug 26, 2007 10:53
Document generated by Confluence on Jan 16, 2008 23:27